<template>
  <span class="undo" v-if="obj.result === null">{{ index + 1 }}: 未完成</span>
  <span class="right" v-else-if="obj.left + obj.right === obj.result">{{ index + 1 }}: 正确</span>
  <span class="error" v-else>{{ index + 1 }}: 错误</span>
</template>

<script>
export default {
  name: 'MyFlag',
  data() {
    return {}
  },
  methods: {},
  components: {},
  computed: {},
  watch: {},
  created() {},
  props: {
    obj: {
      type: Object,
      required: true
    },
    index: Number
  }
}
</script>

<style scoped>
.right {
  color: green;
}
.error {
  color: red;
}
.undo {
  color: #ccc;
}
</style>